var ErrTips = (function(){
    function ErrTips(content,time,_closeHandler) {
        ErrTips.super(this);
        this._closeHandler = _closeHandler;
        this.content.text = content;
        if(content.length > 8){
            this.content.width = content.length*30 + 40;
            this.bg.width = this.content.width + 40;
            this.bg.x = (Config.GameWidth - this.bg.width)/2;
            this.content.x = (this.bg.width - this.content.width)/2;
        }
        this.bg.y = 400;
        if(!time || time < 0 ){
            time = 1500
        }
        Laya.timer.once(time,this,function () {
            if(this._closeHandler){
                this._closeHandler();
            }
            this.close();
        })
        this.show();	
    }

    Laya.class(ErrTips, 'ui.ErrTips', ErrTipsUI);
    
    return ErrTips;
})();